# # 字符串的格式化
# name="图书馆打卡"
# message="xxl %s" % name
# print(message)
# date=4.13
# message="xxl %s 日期是 %f" % (name,date)
# print(message)
# ----------------------------------------------------------------------------
# # 字符串格式化精度,小数会四舍五入
# date1=11.345
# date2=11
# print("%7.2f" % date1)
# print("%7d" % date2)
# print("%d"%date2)
# print("%.3f"%date1)
# ----------------------------------------------------------------------------
# # 高效拼接 小数没有精度，原样输出
# name="小米"
# age=20
# stock_price=19.943434
# print(f"姓名是：{name},年龄是：{age},股票价格：{stock_price}")
# ----------------------------------------------------------------------------
# # 表达式
# print("1*1的结果是 %d"%(1*1))
# print(f"1*2的结果是 {1.46*2.0}")
# print("字符串类型： %s"%(type('字符串')))
# ----------------------------------------------------------------------------
# # 练习
# name='小米'
# stock_price=19.9
# stock_code=12121212333
# stock_daily_pay_growth_price=1.7
# growth_days=12
# finally_stock_price=stock_price*stock_daily_pay_growth_price**growth_days
# print("公司：%s ,股票代码：%d ,当前股价：%.2f "%(name,stock_code,stock_price))
# print(f"每日系数：{stock_daily_pay_growth_price},经过 {growth_days}天增长,股票达到：%.2f"%(finally_stock_price))
# ----------------------------------------------------------------------------
# input()__________返回值为字符串
# name=input("输入")
# print("输入成功：", type(name), name)
# name=input()
# name2=input()
# print("您好",name, "您是：",name2)
# ----------------------------------------------------------------------------
# # bool
# bool_1=True
# bool_2=False
# print(1>=2)
# print(1!=1)
# print(bool_1)
# print(bool_2)
# print(f"woo{1>=2}",type(bool_1))
# ----------------------------------------------------------------------------
# if语句
# age=12
# if age>18:
#     print("CN")
#     print("CS")
# print("xx")
# age=int(input())
# if age>18:
#     print("补票")
# print("游玩愉快")
# ----------------------------------------------------------------------------
# # if else
# age=int(input())
# if age>=18:
#     print("您已成年")
# else:
#     print("未成年")
# ----------------------------------------------------------------------------
# # 猜数字 if与else 中语句的执行需要空格缩进4个格子
# import random
# num=random.randint (1,10)
# guess=int (input())
# if guess==num:
#     print("第一次就猜对了")
# else:
#     print("再来")
#     if guess>num:
#         print("猜大了")
#     else:
#         print("猜小了")
#     guess=int(input())
#     if guess==num:
#         print("第二次猜对")
#     else:
#         print("再来")
#         if  guess > num:
#             print("猜大了")
#         else:
#             print("猜小了")
#     guess=int(input())
#     if guess==num:
#         print("第三次")
#     else:
#         print("没机会了")
#
# ----------------------------------------------------------------------------
# # while python中没有i++  i--
# i=1
# sum=0
# while i<=100:
#     sum+=i
#     i+=1
# print(sum)
# ----------------------------------------------------------------------------
# # while重写猜数字
# flag=True
# count=0
# import random
# num=random.randint(1,100)
# while flag:
#     count+=1
#     guess=int(input())
#     if guess==num:
#         print("猜对了")
#         flag=False
#     else:
#         if(guess>num):
#             print("猜大了")
#         else :
#             print("猜小了")
# print(f"总共猜了： {count}")
# ----------------------------------------------------------------------------
# for循环
# count=0
# name="itheima is a brand of itcast"
# for x in name:
#     if x=='a':
#         count+=1
# print(f"name中有{count}个a")
# ----------------------------------------------------------------------------
# # range 的使用
# num=100
# count=0
# for x in range(1,num):
#     if x%2==0:
#         count+=1
# print(f"1到num的偶数有{count}个")
# ----------------------------------------------------------------------------
# for 循环的作用域
# # 可以访问到但是不好
# for i in range(5):
#     print(i)
# print(i)
# # 正确用法
# i=0
# for i in range(5):
#     print(i)
# print(i)
# ----------------------------------------------------------------------------
# #九九乘法表 for版本
# for i in range(1,10):
#     for j in range(1,i+1):
#         print(f"{j}*{i}={j*i}\t",end='')
#     print()
# ----------------------------------------------------------------------------
# # continue 与 break
# money=10000
# for i in range(1,21):
#     import random
#     score=random.randint(1,10)
#     if score<5:
#         print(f"员工{i}的绩效为{score}，不满足，没有工资")
#         continue
#     # else:
#     #     print(f"员工{i}的绩效为{score}，满足，有工资!!!!!!!!")
#     if money>0:
#         money-=1000
#         print(f"员工{i}的工资为{1000}，剩余{money}")
#     else:
#         print(f"公司没钱了，员工{i}及以后的人得下个月了")
#         break
